namespace Prometheus.Binding.Validation.Rules.Simple
{
    public class proNotEmptyStringRule : proValidationRuleBase
    {
        public proNotEmptyStringRule()
        {
            ErrorText = "String must not be empty";
        }

        public override void Validate(object value, object dataContext)
        {
            if (value == null || string.IsNullOrEmpty(value.ToString())) ThrowInvalid();
        }
    }
}